{% extends "isa/home.html" %}
{% load static %}
{% block title_js %}
    <script type="text/javascript" src=" {% static 'js/jquery.js' %}"></script>

{% endblock %}

{%  block css_head %}
<link rel="stylesheet" type="text/css" href="{% static 'css/home.css' %}">
<link href="{% static 'css/user.css' %}" rel="stylesheet"></link>
<link href="{% static 'css/question.css' %}" rel="stylesheet"></link>
{% endblock %}

{% block middle_body %}
        {% block back %}
        <a href="/question/box/all"  ><div onmouseover="index_anim_on()" onmouseout="index_anim_out()" class="index-menu img img-circle ">
            <p style="position:fixed ;bottom: 2px ; left:53%; color: white">INDEX</p>
        </div></a>
        {% endblock %}
        <div class="content-box">
            
            <div class="thumbnail answer">
                <div class="title-question">
                    标签 :
                    {% for tag in tags %}
                    <span class="label label-primary title-tag">{{ tag }}</span>
                    {% endfor %}
                    文件: <code class="content-file-path">
                        <a href="/media/{{ file_path }}">查看/下载</a>
                    </code>
                    {% if link %}
                     链接:
                    <a  href="{{ link }}">{{ link }}</a>
                    {% endif %}

                </div>
                <div class="content-question">
                    <h3>{{ title }}</h3>
                    <p class="font-solid">
                        {{ content }}
                    </p>
                    
                </div>
                {% block form_b %}
                <div class="answer-form">
                <form method="POST" id="login-form"  action="/question/{{ id }}"  class="navbar-form navbar-right">
                {% csrf_token %}
                    <input type="hidden" name="question_id"  value="{{ id }}" >

                    <div class="form-group">
                        <div class="input-group ">
                    
                            <input type="text" name="answer" id="name" class="form-control" placeholder="answer"    aria-describedby="sizing-addon1">

                        </div>
                       
                        <button class="btn btn-default"   value="commit" name="commit">Sub Answer</button>
                    </div>
                </form>
                {% endblock %}
                {% if if_exist_next  %}
                <a class="btn btn-default next" href="/question/{{if_exist_next}}">下一题</a>
                {% endif %}
                {% if if_ahead  %}
                <a class="btn btn-default ahead" href="/question/{{if_ahead}}">上一题</a>
                {% endif %}
                </div>
            </div>
            
        </div>
        {% if if_right %}
        <div class="answer-alert alert alert-success alert-dismissible fade in" id="answer-ok" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
            <strong>{{ user_name }}</strong> 这题，你已经正确过关了。
        </div>
        {% endif %}

{% endblock %}

{% block body_js %}
<script type="text/javascript" src="{% static 'js/question.js' %}" ></script>
{% endblock %}